3.12 \(\int \frac{\sqrt{c+d x} (e+f x)}{x (a+b x)} \, dx\)

Optimal. Leaf size=101 \[ \frac{2 \sqrt{b c-a d} (b e-a f) \tanh ^{-1}\left (\frac{\sqrt{b} \sqrt{c+d x}}{\sqrt{b c-a d}}\right )}{a b^{3/2}}-\frac{2 \sqrt{c} e \tanh ^{-1}\left (\frac{\sqrt{c+d x}}{\sqrt{c}}\right )}{a}+\frac{2 f \sqrt{c+d x}}{b} \]

[Out]

(2*f*Sqrt[c + d*x])/b - (2*Sqrt[c]*e*ArcTanh[Sqrt[c + d*x]/Sqrt[c]])/a + (2*Sqrt[b*c - a*d]*(b*e - a*f)*ArcTan
h[(Sqrt[b]*Sqrt[c + d*x])/Sqrt[b*c - a*d]])/(a*b^(3/2))

________________________________________________________________________________________

Rubi [A]  time = 0.113531, antiderivative size = 101, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {154, 156, 63, 208} \[ \frac{2 \sqrt{b c-a d} (b e-a f) \tanh ^{-1}\left (\frac{\sqrt{b} \sqrt{c+d x}}{\sqrt{b c-a d}}\right )}{a b^{3/2}}-\frac{2 \sqrt{c} e \tanh ^{-1}\left (\frac{\sqrt{c+d x}}{\sqrt{c}}\right )}{a}+\frac{2 f \sqrt{c+d x}}{b} \]

Antiderivative was successfully verified.

[In]

Int[(Sqrt[c + d*x]*(e + f*x))/(x*(a + b*x)),x]

[Out]

(2*f*Sqrt[c + d*x])/b - (2*Sqrt[c]*e*ArcTanh[Sqrt[c + d*x]/Sqrt[c]])/a + (2*Sqrt[b*c - a*d]*(b*e - a*f)*ArcTan
h[(Sqrt[b]*Sqrt[c + d*x])/Sqrt[b*c - a*d]])/(a*b^(3/2))

Rule 154

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)), x_Symb
ol] :> Simp[(h*(a + b*x)^m*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(d*f*(m + n + p + 2)), x] + Dist[1/(d*f*(m + n
 + p + 2)), Int[(a + b*x)^(m - 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*g*(m + n + p + 2) - h*(b*c*e*m + a*(d*e*(
n + 1) + c*f*(p + 1))) + (b*d*f*g*(m + n + p + 2) + h*(a*d*f*m - b*(d*e*(m + n + 1) + c*f*(m + p + 1))))*x, x]
, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x] && GtQ[m, 0] && NeQ[m + n + p + 2, 0] && IntegersQ[2*m, 2
*n, 2*p]

Rule 156

Int[(((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :>
 Dist[(b*g - a*h)/(b*c - a*d), Int[(e + f*x)^p/(a + b*x), x], x] - Dist[(d*g - c*h)/(b*c - a*d), Int[(e + f*x)
^p/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sqrt{c+d x} (e+f x)}{x (a+b x)} \, dx &=\frac{2 f \sqrt{c+d x}}{b}+\frac{2 \int \frac{\frac{b c e}{2}+\frac{1}{2} (b d e+b c f-a d f) x}{x (a+b x) \sqrt{c+d x}} \, dx}{b}\\ &=\frac{2 f \sqrt{c+d x}}{b}+\frac{(c e) \int \frac{1}{x \sqrt{c+d x}} \, dx}{a}-\frac{((b c-a d) (b e-a f)) \int \frac{1}{(a+b x) \sqrt{c+d x}} \, dx}{a b}\\ &=\frac{2 f \sqrt{c+d x}}{b}+\frac{(2 c e) \operatorname{Subst}\left (\int \frac{1}{-\frac{c}{d}+\frac{x^2}{d}} \, dx,x,\sqrt{c+d x}\right )}{a d}-\frac{(2 (b c-a d) (b e-a f)) \operatorname{Subst}\left (\int \frac{1}{a-\frac{b c}{d}+\frac{b x^2}{d}} \, dx,x,\sqrt{c+d x}\right )}{a b d}\\ &=\frac{2 f \sqrt{c+d x}}{b}-\frac{2 \sqrt{c} e \tanh ^{-1}\left (\frac{\sqrt{c+d x}}{\sqrt{c}}\right )}{a}+\frac{2 \sqrt{b c-a d} (b e-a f) \tanh ^{-1}\left (\frac{\sqrt{b} \sqrt{c+d x}}{\sqrt{b c-a d}}\right )}{a b^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.114611, size = 101, normalized size = 1. \[ \frac{2 \sqrt{b c-a d} (b e-a f) \tanh ^{-1}\left (\frac{\sqrt{b} \sqrt{c+d x}}{\sqrt{b c-a d}}\right )}{a b^{3/2}}-\frac{2 \sqrt{c} e \tanh ^{-1}\left (\frac{\sqrt{c+d x}}{\sqrt{c}}\right )}{a}+\frac{2 f \sqrt{c+d x}}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[c + d*x]*(e + f*x))/(x*(a + b*x)),x]

[Out]

(2*f*Sqrt[c + d*x])/b - (2*Sqrt[c]*e*ArcTanh[Sqrt[c + d*x]/Sqrt[c]])/a + (2*Sqrt[b*c - a*d]*(b*e - a*f)*ArcTan
h[(Sqrt[b]*Sqrt[c + d*x])/Sqrt[b*c - a*d]])/(a*b^(3/2))

________________________________________________________________________________________

Maple [B]  time = 0.011, size = 196, normalized size = 1.9 \begin{align*} 2\,{\frac{f\sqrt{dx+c}}{b}}-2\,{\frac{e\sqrt{c}}{a}{\it Artanh} \left ({\frac{\sqrt{dx+c}}{\sqrt{c}}} \right ) }-2\,{\frac{adf}{b\sqrt{ \left ( ad-bc \right ) b}}\arctan \left ({\frac{b\sqrt{dx+c}}{\sqrt{ \left ( ad-bc \right ) b}}} \right ) }+2\,{\frac{cf}{\sqrt{ \left ( ad-bc \right ) b}}\arctan \left ({\frac{b\sqrt{dx+c}}{\sqrt{ \left ( ad-bc \right ) b}}} \right ) }+2\,{\frac{de}{\sqrt{ \left ( ad-bc \right ) b}}\arctan \left ({\frac{b\sqrt{dx+c}}{\sqrt{ \left ( ad-bc \right ) b}}} \right ) }-2\,{\frac{bce}{a\sqrt{ \left ( ad-bc \right ) b}}\arctan \left ({\frac{b\sqrt{dx+c}}{\sqrt{ \left ( ad-bc \right ) b}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)*(d*x+c)^(1/2)/x/(b*x+a),x)

[Out]

2*f*(d*x+c)^(1/2)/b-2*e*arctanh((d*x+c)^(1/2)/c^(1/2))*c^(1/2)/a-2*a/b/((a*d-b*c)*b)^(1/2)*arctan(b*(d*x+c)^(1
/2)/((a*d-b*c)*b)^(1/2))*d*f+2/((a*d-b*c)*b)^(1/2)*arctan(b*(d*x+c)^(1/2)/((a*d-b*c)*b)^(1/2))*c*f+2/((a*d-b*c
)*b)^(1/2)*arctan(b*(d*x+c)^(1/2)/((a*d-b*c)*b)^(1/2))*d*e-2/a*b/((a*d-b*c)*b)^(1/2)*arctan(b*(d*x+c)^(1/2)/((
a*d-b*c)*b)^(1/2))*c*e

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*(d*x+c)^(1/2)/x/(b*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.69275, size = 1013, normalized size = 10.03 \begin{align*} \left [\frac{b \sqrt{c} e \log \left (\frac{d x - 2 \, \sqrt{d x + c} \sqrt{c} + 2 \, c}{x}\right ) + 2 \, \sqrt{d x + c} a f -{\left (b e - a f\right )} \sqrt{\frac{b c - a d}{b}} \log \left (\frac{b d x + 2 \, b c - a d - 2 \, \sqrt{d x + c} b \sqrt{\frac{b c - a d}{b}}}{b x + a}\right )}{a b}, \frac{b \sqrt{c} e \log \left (\frac{d x - 2 \, \sqrt{d x + c} \sqrt{c} + 2 \, c}{x}\right ) + 2 \, \sqrt{d x + c} a f + 2 \,{\left (b e - a f\right )} \sqrt{-\frac{b c - a d}{b}} \arctan \left (-\frac{\sqrt{d x + c} b \sqrt{-\frac{b c - a d}{b}}}{b c - a d}\right )}{a b}, \frac{2 \, b \sqrt{-c} e \arctan \left (\frac{\sqrt{d x + c} \sqrt{-c}}{c}\right ) + 2 \, \sqrt{d x + c} a f -{\left (b e - a f\right )} \sqrt{\frac{b c - a d}{b}} \log \left (\frac{b d x + 2 \, b c - a d - 2 \, \sqrt{d x + c} b \sqrt{\frac{b c - a d}{b}}}{b x + a}\right )}{a b}, \frac{2 \,{\left (b \sqrt{-c} e \arctan \left (\frac{\sqrt{d x + c} \sqrt{-c}}{c}\right ) + \sqrt{d x + c} a f +{\left (b e - a f\right )} \sqrt{-\frac{b c - a d}{b}} \arctan \left (-\frac{\sqrt{d x + c} b \sqrt{-\frac{b c - a d}{b}}}{b c - a d}\right )\right )}}{a b}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*(d*x+c)^(1/2)/x/(b*x+a),x, algorithm="fricas")

[Out]

[(b*sqrt(c)*e*log((d*x - 2*sqrt(d*x + c)*sqrt(c) + 2*c)/x) + 2*sqrt(d*x + c)*a*f - (b*e - a*f)*sqrt((b*c - a*d
)/b)*log((b*d*x + 2*b*c - a*d - 2*sqrt(d*x + c)*b*sqrt((b*c - a*d)/b))/(b*x + a)))/(a*b), (b*sqrt(c)*e*log((d*
x - 2*sqrt(d*x + c)*sqrt(c) + 2*c)/x) + 2*sqrt(d*x + c)*a*f + 2*(b*e - a*f)*sqrt(-(b*c - a*d)/b)*arctan(-sqrt(
d*x + c)*b*sqrt(-(b*c - a*d)/b)/(b*c - a*d)))/(a*b), (2*b*sqrt(-c)*e*arctan(sqrt(d*x + c)*sqrt(-c)/c) + 2*sqrt
(d*x + c)*a*f - (b*e - a*f)*sqrt((b*c - a*d)/b)*log((b*d*x + 2*b*c - a*d - 2*sqrt(d*x + c)*b*sqrt((b*c - a*d)/
b))/(b*x + a)))/(a*b), 2*(b*sqrt(-c)*e*arctan(sqrt(d*x + c)*sqrt(-c)/c) + sqrt(d*x + c)*a*f + (b*e - a*f)*sqrt
(-(b*c - a*d)/b)*arctan(-sqrt(d*x + c)*b*sqrt(-(b*c - a*d)/b)/(b*c - a*d)))/(a*b)]

________________________________________________________________________________________

Sympy [A]  time = 17.0919, size = 97, normalized size = 0.96 \begin{align*} \frac{2 f \sqrt{c + d x}}{b} + \frac{2 c e \operatorname{atan}{\left (\frac{\sqrt{c + d x}}{\sqrt{- c}} \right )}}{a \sqrt{- c}} - \frac{2 \left (a d - b c\right ) \left (a f - b e\right ) \operatorname{atan}{\left (\frac{\sqrt{c + d x}}{\sqrt{\frac{a d - b c}{b}}} \right )}}{a b^{2} \sqrt{\frac{a d - b c}{b}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*(d*x+c)**(1/2)/x/(b*x+a),x)

[Out]

2*f*sqrt(c + d*x)/b + 2*c*e*atan(sqrt(c + d*x)/sqrt(-c))/(a*sqrt(-c)) - 2*(a*d - b*c)*(a*f - b*e)*atan(sqrt(c
+ d*x)/sqrt((a*d - b*c)/b))/(a*b**2*sqrt((a*d - b*c)/b))

________________________________________________________________________________________

Giac [A]  time = 1.43571, size = 151, normalized size = 1.5 \begin{align*} \frac{2 \, c \arctan \left (\frac{\sqrt{d x + c}}{\sqrt{-c}}\right ) e}{a \sqrt{-c}} + \frac{2 \, \sqrt{d x + c} f}{b} + \frac{2 \,{\left (a b c f - a^{2} d f - b^{2} c e + a b d e\right )} \arctan \left (\frac{\sqrt{d x + c} b}{\sqrt{-b^{2} c + a b d}}\right )}{\sqrt{-b^{2} c + a b d} a b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*(d*x+c)^(1/2)/x/(b*x+a),x, algorithm="giac")

[Out]

2*c*arctan(sqrt(d*x + c)/sqrt(-c))*e/(a*sqrt(-c)) + 2*sqrt(d*x + c)*f/b + 2*(a*b*c*f - a^2*d*f - b^2*c*e + a*b
*d*e)*arctan(sqrt(d*x + c)*b/sqrt(-b^2*c + a*b*d))/(sqrt(-b^2*c + a*b*d)*a*b)